#include <iostream>
#include <fcntl.h>
#include <unistd.h>
#include <cstring>

void print()
{
    std::cout<<"this is a print"<<std::endl;
}

void readbook()
{
    std::cout<<"this is a readbook"<<std::endl;
}

void seesea()
{
    std::cout<<"this is a seesea"<<std::endl;
}

void eat()
{
    std::cout<<"this is a eat"<<std::endl;
}

void setNonBlock(int fd)
{
    int res = fcntl(fd, F_GETFL);
    if (res < 0)
    {
        std::cerr << "错误" << strerror(errno) << std::endl;
        return;
    }
    fcntl(fd, F_SETFL, res | O_NONBLOCK);
}